home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Resources / Chat & Communication / Digsby build 37 / digsby_setup.exe / lib / PIL / ImageChops.pyo (.txt) < prev    next >
Python Compiled Bytecode  |  2008-10-13  |  4KB  |  106 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyo (Python 2.5)
  3.  
  4. import Image
  5.  
  6. def constant(image, value):
  7.     return Image.new('L', image.size, value)
  8.  
  9.  
  10. def duplicate(image):
  11.     return image.copy()
  12.  
  13.  
  14. def invert(image):
  15.     image.load()
  16.     return image._new(image.im.chop_invert())
  17.  
  18.  
  19. def lighter(image1, image2):
  20.     image1.load()
  21.     image2.load()
  22.     return image1._new(image1.im.chop_lighter(image2.im))
  23.  
  24.  
  25. def darker(image1, image2):
  26.     image1.load()
  27.     image2.load()
  28.     return image1._new(image1.im.chop_darker(image2.im))
  29.  
  30.  
  31. def difference(image1, image2):
  32.     image1.load()
  33.     image2.load()
  34.     return image1._new(image1.im.chop_difference(image2.im))
  35.  
  36.  
  37. def multiply(image1, image2):
  38.     image1.load()
  39.     image2.load()
  40.     return image1._new(image1.im.chop_multiply(image2.im))
  41.  
  42.  
  43. def screen(image1, image2):
  44.     image1.load()
  45.     image2.load()
  46.     return image1._new(image1.im.chop_screen(image2.im))
  47.  
  48.  
  49. def add(image1, image2, scale = 1, offset = 0):
  50.     image1.load()
  51.     image2.load()
  52.     return image1._new(image1.im.chop_add(image2.im, scale, offset))
  53.  
  54.  
  55. def subtract(image1, image2, scale = 1, offset = 0):
  56.     image1.load()
  57.     image2.load()
  58.     return image1._new(image1.im.chop_subtract(image2.im, scale, offset))
  59.  
  60.  
  61. def add_modulo(image1, image2):
  62.     image1.load()
  63.     image2.load()
  64.     return image1._new(image1.im.chop_add_modulo(image2.im))
  65.  
  66.  
  67. def subtract_modulo(image1, image2):
  68.     image1.load()
  69.     image2.load()
  70.     return image1._new(image1.im.chop_subtract_modulo(image2.im))
  71.  
  72.  
  73. def logical_and(image1, image2):
  74.     image1.load()
  75.     image2.load()
  76.     return image1._new(image1.im.chop_and(image2.im))
  77.  
  78.  
  79. def logical_or(image1, image2):
  80.     image1.load()
  81.     image2.load()
  82.     return image1._new(image1.im.chop_or(image2.im))
  83.  
  84.  
  85. def logical_xor(image1, image2):
  86.     image1.load()
  87.     image2.load()
  88.     return image1._new(image1.im.chop_xor(image2.im))
  89.  
  90.  
  91. def blend(image1, image2, alpha):
  92.     return Image.blend(image1, image2, alpha)
  93.  
  94.  
  95. def composite(image1, image2, mask):
  96.     return Image.composite(image1, image2, mask)
  97.  
  98.  
  99. def offset(image, xoffset, yoffset = None):
  100.     if yoffset is None:
  101.         yoffset = xoffset
  102.     
  103.     image.load()
  104.     return image._new(image.im.offset(xoffset, yoffset))
  105.  
  106.